package model

// StockMenuModel 结构体
type StockMenuModel struct {
	Id             uint       `gorm:"column:id;isNullable:NO;" json:"id,omitempty"`
	ParentId       uint       `gorm:"column:parent_id;comment:父Id;default:0;isNullable:YES;" json:"parentId,omitempty"`
	MenuName       string     `binding:"required" gorm:"column:menu_name;comment:菜单名称;isNullable:NO;size:100;" json:"menuName,omitempty"`
	Status         string     `gorm:"column:status;comment:状态 Y/N 正常/禁用;default:Y;isNullable:YES;size:10;" json:"status,omitempty"`
	MenuType       int        `binding:"required" gorm:"column:menu_type;comment:1：目录 2：菜单 3：按钮 ;isNullable:NO;" json:"menuType,omitempty"`
	MenuRouterPath string     ` gorm:"column:menu_router_path;comment:路由路径;isNullable:YES;size:150;" json:"menuRouterPath,omitempty"`
	MenuModulePath string     `gorm:"column:menu_module_path;comment:组件路径;isNullable:YES;size:150;" json:"menuModulePath,omitempty"`
	MenuApiId      uint       `binding:"required" gorm:"column:menu_api_id;comment:请求后端路径;isNullable:YES;" json:"menuApiId"`
	MenuOrder      uint       `gorm:"column:menu_order;comment:排序;isNullable:NO;" json:"menuOrder,omitempty"`
	IconId         uint       `gorm:"column:icon_id;comment:图标;isNullable:YES;" json:"iconId,omitempty"`
	CreateBy       string     `gorm:"column:create_by;comment:创建人;default:initsys;isNullable:NO;size:150;" json:"createBy,omitempty"`
	Remark         string     `gorm:"column:remark;comment:备注说明;isNullable:YES;size:255;" json:"remark,omitempty"`
	CreateTime     *LocalTime `gorm:"column:create_time;default:CURRENT_TIMESTAMP;isNullable:NO;" json:"createTime"`
	LastUpdTime    *LocalTime `gorm:"column:last_upd_time;default:CURRENT_TIMESTAMP;isNullable:NO;" json:"lastUpdTime"`
}

func NewStockMenuModel() *StockMenuModel {
	return &StockMenuModel{}
}

// TableName StockMenu 表名
func (a *StockMenuModel) TableName() string {
	return "stock_menu"
}
